<?php
namespace app\admin\controller;

use think\facade\Db;
use think\facade\Request;

class Queue extends Base
{
    public function index(){
        return view('index');
    }
    public function upload(){

        // 获取表单上传文件 例如上传了001.jpg
        $file = request()->file('newpic');

        $savename = \think\facade\Filesystem::putFile( 'topic', $file);
        return json(['code'=>1,'msg'=>'上传成功','data'=>$savename]);
    }
}